package com.blog.common.core.constant;

/**
 * 缓存常量信息
 *
 * @author Vivian
 */
public class CacheConstants
{
    /**
     * 缓存有效期，默认720（分钟）
     */
    public final static long EXPIRATION = 720;

    /**
     * 缓存刷新时间，默认120（分钟）
     */
    public final static long REFRESH_TIME = 120;

    /**
     * 密码最大错误次数
     */
    public final static int PASSWORD_MAX_RETRY_COUNT = 5;

    /**
     * 密码锁定时间，默认10（分钟）
     */
    public final static long PASSWORD_LOCK_TIME = 10;

    /**
     * 权限缓存前缀
     */
    public final static String LOGIN_TOKEN_KEY = "login_tokens:";

    /**
     * 验证码 redis key
     */
    public static final String CAPTCHA_CODE_KEY = "captcha_codes:";

    /**
     * 参数管理 cache key
     */
    public static final String SYS_CONFIG_KEY = "sys_config:";

    /**
     * 字典管理 cache key
     */
    public static final String SYS_DICT_KEY = "sys_dict:";

    /**
     * 登录账户密码错误次数 redis key
     */
    public static final String PWD_ERR_CNT_KEY = "pwd_err_cnt:";

    /**
     * 验证码
     */
    public static final String USER_CODE_KEY = "code:";

    /**
     * 博客浏览量
     */
    public static final String BLOG_VIEWS_COUNT = "web:blog:views_count";

    /**
     * 文章浏览量
     */
    public static final String ARTICLE_VIEWS_COUNT = "web:article:views_count";

    /**
     * 文章点赞量
     */
    public static final String ARTICLE_LIKE_COUNT = "web:article:like_count";

    /**
     * 用户点赞文章
     */
    public static final String ARTICLE_USER_LIKE = "web:article:user_like:";

    /**
     * 说说点赞量
     */
    public static final String TALK_LIKE_COUNT = "web:talk:like_count";

    /**
     * 用户点赞说说
     */
    public static final String TALK_USER_LIKE = "web:talk:user_like:";

    /**
     * 评论点赞量
     */
    public static final String COMMENT_LIKE_COUNT = "web:comment:like_count";

    /**
     * 用户点赞评论
     */
    public static final String COMMENT_USER_LIKE = "web:comment:user_like:";

    /**
     * 网站配置
     */
    public static final String WEBSITE_CONFIG = "web:config:site_config";

    /**
     * 用户地区
     */
    public static final String USER_AREA = "web:config:user_area";

    /**
     * 访客地区
     */
    public static final String VISITOR_AREA = "web:config:visitor_area";

    /**
     * 页面封面
     */
    public static final String PAGE_COVER = "web:config:page_cover";

    /**
     * 关于我信息
     */
    public static final String ABOUT = "web:config:about";

    /**
     * 访客
     */
    public static final String UNIQUE_VISITOR = "web:config:unique_visitor";

    /**
     * 文件信息
     */
    public static final String FILE_INFO = "web:config:file_info";

    public static final String ENCRYPTION_BYTE = "sys_config:encryption_byte ";
}
